package com.core.convenientCode.common;

/**
 * @Author: zql
 * @Description: 启动状态
 * @Data: 14:59 2021/6/1
 */
public enum UseStatus {
    CLOSE((byte) 0, "关闭"),
    OPEN((byte) 1, "启动");

    private final Byte code;
    private final String info;

    UseStatus(Byte code, String info) {
        this.code = code;
        this.info = info;
    }

    public static boolean contains(Byte code){
        if(code >=0 && code<=1){
            return true;
        }
        return false;
    }

    public static boolean isOpen(Byte b){
        return OPEN.code.equals(b);
    }


    public Byte getCode() {
        return code;
    }

    public String getInfo() {
        return info;
    }
}
